package com.example.it_com.entity;

import lombok.Data;
import java.util.List;

@Data
public class PostWithComments {

    private Forumpost post;
    private List<Postcomment> comments;
    private String postimg;
    private List<String> commentImgUrls; // 修改为 List<String>

    // 构造函数
    public PostWithComments(Forumpost post, List<Postcomment> comments, String postimg, List<String> commentImgUrls) {
        this.post = post;
        this.comments = comments;
        this.postimg = postimg;
        this.commentImgUrls = commentImgUrls;
    }



    // Getter 和 Setter 方法
    public Forumpost getPost() {
        return post;
    }

    public void setPost(Forumpost post) {
        this.post = post;
    }

    public List<Postcomment> getComments() {
        return comments;
    }

    public void setComments(List<Postcomment> comments) {
        this.comments = comments;
    }

    public String getPostimg() {
        return postimg;
    }

    public void setPostimg(String postimg) {
        this.postimg = postimg;
    }

    public List<String> getCommentImgUrls() { // 修改方法名
        return commentImgUrls;
    }

    public void setCommentImgUrls(List<String> commentImgUrls) { // 修改方法名
        this.commentImgUrls = commentImgUrls;
    }
}
